n=eval(input())
if n>50:
    print("cost = %.2f"%(26.5+(n-50)*0.58))
elif n>0:
    print("cost = %.2f"%(0.53*n))
else :
    print("Invalid Value!")